<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta content="text/html" charset="utf-8">
	<title>学生登录页面</title>
	<style type="text/css">
		html{
			width:100%;
			height:98%;
		}
		body{
			width:99%;
			height:90%;
			background-image: url("img/qq.jpg");
		}
		.input{
			width: 190px;
			height:30px;
			color: #BEA3A3;
		}
		#login{
			float: left;
			padding-left: 4%;
			width: 270px;
			height: 400px;
			border-width: 1px;
			margin-left: 40%;
			margin-top: 14%;
			padding-top:-100px;
			background:#ccff99;
		}
		#log{
			
		}
		#tile{
			margin-left: 18%;
			font-size:26px;
		}
		#t1{
			color: RED;
		}
		#t2{
			color: RED;
		}
		body{
			
		}

		#btn2{
			width:300px;
			height: 40px;
			margin:40px auto 0 auto;
		}

		#btn2 {
			width:99%;
			margin:0;
			padding:.5em 0;
			-webkit-border-radius:.3em;
			-moz-border-radius: .3em;
			border:#1263be solid 1px;
			background:#1b85fd;
			color:#FFF;
			font-size:17px;
			font-weight:bolder;
			letter-spacing:1em;
		}

		#btn2:hover{
			background:#1263be;
		}
		#message{
			margin-left:7%;
			margin-top:-23px;
			color:RED;
			font-size:23px;
		}
		
		#ma{
			width:11%;
			margin-left:88%;
		}
		#ma img{
			width:100%;
		}

	</style>

	<script type="text/javascript">
	function stop(){
		return false;
		}
		document.oncontextmenu=stop;
	
		function check() {
			var form = document.getElementById("log");
			var t = document.getElementsByTagName("input");
			if(t[0].value=="") {
				document.getElementById("t1").innerHTML = "   请输入用户名！";
				return;
			}
			else document.getElementById("t1").innerHTML = "";

			if(t[1].value=="") {
				document.getElementById("t2").innerHTML = "   请输入密码！";
				return;
			}
			else document.getElementById("t2").innerHTML = "";
			form.submit();
		}
		function clean(node,str){
			if(node.value==str) node.value = "";
		}
		document.onkeydown=function(event){
		    var e = event || window.event || arguments.callee.caller.arguments[0];
		    if(e && e.keyCode==13)   check(); //enter  
		}
	</script>


</head>
<body>

<div id="login">
	<h4 id="tile">用户登录</h6>
	<form method="post" action="Login.do" id="log">
		<table>
			<tr>
				<td> <input type="text" name="user" class="input" value="用户名" onfocus="clean(this,'用户名')"> </td>
			</tr>
			<tr> <td> <label id="t1"></label> </td> </tr>
			<tr>
				<td> <input type="password" name="passwd" class="input" value="密码111" onfocus="clean(this,'密码111')"> </td>	
			</tr>
			<tr> <td> <label id="t2"></label> </td> </tr>
			<tr>
				<td >
					<input type="button" name="" value="登录" id="btn2" onclick="check()">
				</td>
			</tr>
				<tr> 
					<td colspan="1"><a href="#"> 忘记密码？</a></td> 
					<td><a href="register.jsp"> 没有帐号？</a></td>
			</tr>
			<tr>
				<td> <a href="backStageLogin.jsp"> 我是老师！ </a>  </td>
			</tr>
		</table>
		<div id="message">
		<%
		Object e = request.getAttribute("error");
		if(e!=null) out.print(e); 
		%>
	</div>
		
	</form>
</div>
	<div id="ma">
	<img  src="img/ma.PNG">
	<br>
	<label>扫码获得安卓客户端</label>
	</div>
</body>
</html>


